package com.tupu.service.dispatch;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tupu.common.PageResult;
import com.tupu.entity.dispatch.*;
import com.tupu.entity.dto.WarningEventFailurePlanDto;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.text.ParseException;
import java.util.List;
import java.util.Map;

public interface WarningEventService extends IService<WarningEvent> {

    //告警事件条件搜索、分页
    PageResult<WarningEvent> conditionSearch(Long page, Long size, String event_type, String station, String device_type, String startTime, String endTime,String device) throws ParseException;

    //展示所有长站
    Map<String, Integer> findAllStation();

    //展示所有设备类型
    Map<String, String> findAllDeviceType();

    //展示所有设备
    Map<String, Integer> findAllDevice();

    //关联的告警信号 详情
    List<WarningEventContactSignalData> findByEventId(String event_id);

    //分析得出故障预案 （查询neo4j）
    WarningEventFailurePlan recommendPlan(String event_id, Long node_id) throws IOException;

    //遗失信号
    List<WarningEventMissData> findMissData(String event_id);

    //故障预案识别导入
    void uploadWordPlan(MultipartFile file,String eventId) throws Exception;

    List<WarningEventFailurePlanDto> recommend(String eventId) throws IOException;

    //根据告警、异常信息匹配调度日志
    PageResult findDispatchByEventId(String eventId, Long page, Long size);

    List<WarningEventDispatchData> findDispatchListByEventIdNoPage(String eventId);

    //根据告警事件 匹配到预案，再匹配检修单
    PageResult findJxdByEventId(String eventId, Long page, Long size);

    //根据告警事件 匹配到预案，再匹配操作票
    PageResult findCzpByEventId(String eventId, Long page, Long size);

    WarningEventFailurePlan findPlanByPlanId(String planId);

    //测试t0125异常信号数据
    void windexAnalysis();

    //测试t0121告警事件数据
    void findexAnalysis(Integer localDate);

    void batchUploadWordPlan(MultipartFile file) throws Exception;
}
